package lt.ntec.sudokusolver;

import java.util.Random;

import android.content.Context;
import android.widget.Button;
import android.widget.TableLayout;
import android.widget.TableRow;

public class UISmallPiece extends TableLayout {

	public UISmallPiece(Context context) {
		super(context);
		setColumnStretchable(0, true);
        setColumnStretchable(1, true);
        setColumnStretchable(2, true);
		Random generator = new Random( 19580427 );
		for (int i = 0; i < 3; i++) {
			TableRow row = new TableRow(getContext());
			for (int j = 0; j < 3; j++) {
				Button but = new Button(row.getContext());
				int b = generator.nextInt(10);
				but.setText(new Integer(b).toString());
				row.addView(but, j);
			}
			addView(row);
		}

	}

}
